<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class Bundler::Runtime - bundler: Ruby Standard Library Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../Object.html">Object</a>
</div>

        
<div id="includes-section" class="nav-section">
  <h3>Included Modules</h3>

  <ul class="link-list">
    <li><a class="include" href="SharedHelpers.html">Bundler::SharedHelpers</a>
  </ul>
</div>

        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-definition_method">::definition_method</a>
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-cache">#cache</a>
    <li ><a href="#method-i-check_for_activated_spec-21">#check_for_activated_spec!</a>
    <li ><a href="#method-i-clean">#clean</a>
    <li ><a href="#method-i-lock">#lock</a>
    <li ><a href="#method-i-prune_cache">#prune_cache</a>
    <li ><a href="#method-i-prune_gem_cache">#prune_gem_cache</a>
    <li ><a href="#method-i-prune_git_and_path_cache">#prune_git_and_path_cache</a>
    <li ><a href="#method-i-remove_dir">#remove_dir</a>
    <li ><a href="#method-i-require">#require</a>
    <li ><a href="#method-i-setup">#setup</a>
    <li ><a href="#method-i-setup_manpath">#setup_manpath</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-Bundler::Runtime">
    <h1 id="class-Bundler::Runtime" class="class">
      class Bundler::Runtime
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">





                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(root, definition)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 7</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">root</span>, <span class="ruby-identifier">definition</span>)
  <span class="ruby-ivar">@root</span> = <span class="ruby-identifier">root</span>
  <span class="ruby-ivar">@definition</span> = <span class="ruby-identifier">definition</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Class Methods</h3>
                </header>

                  <div id="method-c-definition_method" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">definition_method</span><span
                                class="method-args">(meth)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="definition_method-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 82</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">definition_method</span>(<span class="ruby-identifier">meth</span>)
  <span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">meth</span>) <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;no definition when calling Runtime##{meth}&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@definition</span>
    <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">meth</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-cache" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cache</span><span
                                class="method-args">(custom_path = nil, local = false)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="cache-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 103</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cache</span>(<span class="ruby-identifier">custom_path</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">local</span> = <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">cache_path</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">app_cache</span>(<span class="ruby-identifier">custom_path</span>)
  <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">filesystem_access</span>(<span class="ruby-identifier">cache_path</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
    <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">p</span>)
  <span class="ruby-keyword">end</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">cache_path</span>)

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Updating files in #{Bundler.settings.app_cache_path}&quot;</span>

  <span class="ruby-identifier">specs_to_cache</span> = <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:cache_all_platforms</span>]
    <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">resolve</span>.<span class="ruby-identifier">materialized_for_all_platforms</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-keyword">begin</span>
      <span class="ruby-identifier">specs</span>
    <span class="ruby-keyword">rescue</span> <span class="ruby-constant">GemNotFound</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">local</span>
        <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-node">&quot;Some gems seem to be missing from your #{Bundler.settings.app_cache_path} directory.&quot;</span>
      <span class="ruby-keyword">end</span>

      <span class="ruby-identifier">raise</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">specs_to_cache</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;bundler&quot;</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Gemspec</span>)
    <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">cache</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-identifier">custom_path</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:cache</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-constant">Dir</span>[<span class="ruby-identifier">cache_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;*/.git&quot;</span>)].<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">git_dir</span><span class="ruby-operator">|</span>
    <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">git_dir</span>)
    <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">touch</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-string">&quot;../.bundlecache&quot;</span>, <span class="ruby-identifier">git_dir</span>))
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">prune_cache</span>(<span class="ruby-identifier">cache_path</span>) <span class="ruby-keyword">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:no_prune</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-clean" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">clean</span><span
                                class="method-args">(dry_run = false)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="clean-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 148</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">clean</span>(<span class="ruby-identifier">dry_run</span> = <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">gem_bins</span>             = <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{Gem.dir}/bin/*&quot;</span>]
  <span class="ruby-identifier">git_dirs</span>             = <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{Gem.dir}/bundler/gems/*&quot;</span>]
  <span class="ruby-identifier">git_cache_dirs</span>       = <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{Gem.dir}/cache/bundler/git/*&quot;</span>]
  <span class="ruby-identifier">gem_dirs</span>             = <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{Gem.dir}/gems/*&quot;</span>]
  <span class="ruby-identifier">gem_files</span>            = <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{Gem.dir}/cache/*.gem&quot;</span>]
  <span class="ruby-identifier">gemspec_files</span>        = <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{Gem.dir}/specifications/*.gemspec&quot;</span>]
  <span class="ruby-identifier">extension_dirs</span>       = <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{Gem.dir}/extensions/*/*/*&quot;</span>] <span class="ruby-operator">+</span> <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{Gem.dir}/bundler/gems/extensions/*/*/*&quot;</span>]
  <span class="ruby-identifier">spec_gem_paths</span>       = []
  <span class="ruby-comment"># need to keep git sources around</span>
  <span class="ruby-identifier">spec_git_paths</span>       = <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">spec_git_paths</span>
  <span class="ruby-identifier">spec_git_cache_dirs</span>  = []
  <span class="ruby-identifier">spec_gem_executables</span> = []
  <span class="ruby-identifier">spec_cache_paths</span>     = []
  <span class="ruby-identifier">spec_gemspec_paths</span>   = []
  <span class="ruby-identifier">spec_extension_paths</span> = []
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">add_default_gems_to</span>(<span class="ruby-identifier">specs</span>).<span class="ruby-identifier">values</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">spec_gem_paths</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">full_gem_path</span>
    <span class="ruby-comment"># need to check here in case gems are nested like for the rails git repo</span>
    <span class="ruby-identifier">md</span> = <span class="ruby-regexp">%r{(.+bundler/gems/.+-[a-f0-9]{7,12})}</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">full_gem_path</span>)
    <span class="ruby-identifier">spec_git_paths</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">md</span>[<span class="ruby-value">1</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">md</span>
    <span class="ruby-identifier">spec_gem_executables</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">executables</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">executable</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">e</span> = <span class="ruby-node">&quot;#{Bundler.rubygems.gem_bindir}/#{executable}&quot;</span>
      [<span class="ruby-identifier">e</span>, <span class="ruby-node">&quot;#{e}.bat&quot;</span>]
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">spec_cache_paths</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">cache_file</span>
    <span class="ruby-identifier">spec_gemspec_paths</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">spec_file</span>
    <span class="ruby-identifier">spec_extension_paths</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">extension_dir</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:extension_dir</span>)
    <span class="ruby-identifier">spec_git_cache_dirs</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">cache_path</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">spec_gem_paths</span>.<span class="ruby-identifier">uniq!</span>
  <span class="ruby-identifier">spec_gem_executables</span>.<span class="ruby-identifier">flatten!</span>

  <span class="ruby-identifier">stale_gem_bins</span>       = <span class="ruby-identifier">gem_bins</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">spec_gem_executables</span>
  <span class="ruby-identifier">stale_git_dirs</span>       = <span class="ruby-identifier">git_dirs</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">spec_git_paths</span> <span class="ruby-operator">-</span> [<span class="ruby-node">&quot;#{Gem.dir}/bundler/gems/extensions&quot;</span>]
  <span class="ruby-identifier">stale_git_cache_dirs</span> = <span class="ruby-identifier">git_cache_dirs</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">spec_git_cache_dirs</span>
  <span class="ruby-identifier">stale_gem_dirs</span>       = <span class="ruby-identifier">gem_dirs</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">spec_gem_paths</span>
  <span class="ruby-identifier">stale_gem_files</span>      = <span class="ruby-identifier">gem_files</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">spec_cache_paths</span>
  <span class="ruby-identifier">stale_gemspec_files</span>  = <span class="ruby-identifier">gemspec_files</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">spec_gemspec_paths</span>
  <span class="ruby-identifier">stale_extension_dirs</span> = <span class="ruby-identifier">extension_dirs</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">spec_extension_paths</span>

  <span class="ruby-identifier">removed_stale_gem_dirs</span> = <span class="ruby-identifier">stale_gem_dirs</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span> <span class="ruby-identifier">remove_dir</span>(<span class="ruby-identifier">dir</span>, <span class="ruby-identifier">dry_run</span>) }
  <span class="ruby-identifier">removed_stale_git_dirs</span> = <span class="ruby-identifier">stale_git_dirs</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span> <span class="ruby-identifier">remove_dir</span>(<span class="ruby-identifier">dir</span>, <span class="ruby-identifier">dry_run</span>) }
  <span class="ruby-identifier">output</span> = <span class="ruby-identifier">removed_stale_gem_dirs</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">removed_stale_git_dirs</span>

  <span class="ruby-keyword">unless</span> <span class="ruby-identifier">dry_run</span>
    <span class="ruby-identifier">stale_files</span> = <span class="ruby-identifier">stale_gem_bins</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">stale_gem_files</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">stale_gemspec_files</span>
    <span class="ruby-identifier">stale_files</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
      <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">filesystem_access</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">file</span>)) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">_p</span><span class="ruby-operator">|</span>
        <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm</span>(<span class="ruby-identifier">file</span>) <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">file</span>)
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">stale_dirs</span> = <span class="ruby-identifier">stale_git_cache_dirs</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">stale_extension_dirs</span>
    <span class="ruby-identifier">stale_dirs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">stale_dir</span><span class="ruby-operator">|</span>
      <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">filesystem_access</span>(<span class="ruby-identifier">stale_dir</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span>
        <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">dir</span>) <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">dir</span>)
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">output</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-lock" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">lock</span><span
                                class="method-args">(opts = {})</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="lock-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 96</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">lock</span>(<span class="ruby-identifier">opts</span> = {})
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">no_resolve_needed?</span>
  <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">lock</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_lockfile</span>, <span class="ruby-identifier">opts</span>[<span class="ruby-value">:preserve_unknown_sections</span>])
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-prune_cache" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">prune_cache</span><span
                                class="method-args">(cache_path)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="prune_cache-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 139</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">prune_cache</span>(<span class="ruby-identifier">cache_path</span>)
  <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">filesystem_access</span>(<span class="ruby-identifier">cache_path</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
    <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">p</span>)
  <span class="ruby-keyword">end</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">cache_path</span>)
  <span class="ruby-identifier">resolve</span> = <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">resolve</span>
  <span class="ruby-identifier">prune_gem_cache</span>(<span class="ruby-identifier">resolve</span>, <span class="ruby-identifier">cache_path</span>)
  <span class="ruby-identifier">prune_git_and_path_cache</span>(<span class="ruby-identifier">resolve</span>, <span class="ruby-identifier">cache_path</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-require" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">require</span><span
                                class="method-args">(*groups)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="require-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 40</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">require</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">groups</span>)
  <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">map!</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:to_sym</span>)
  <span class="ruby-identifier">groups</span> = [<span class="ruby-value">:default</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">empty?</span>

  <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
    <span class="ruby-comment"># Skip the dependency if it is not in any of the requested groups, or</span>
    <span class="ruby-comment"># not for the current platform, or doesn&#39;t match the gem constraints.</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">unless</span> (<span class="ruby-identifier">dep</span>.<span class="ruby-identifier">groups</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">groups</span>).<span class="ruby-identifier">any?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">should_include?</span>

    <span class="ruby-identifier">required_file</span> = <span class="ruby-keyword">nil</span>

    <span class="ruby-keyword">begin</span>
      <span class="ruby-comment"># Loop through all the specified autorequires for the</span>
      <span class="ruby-comment"># dependency. If there are none, use the dependency&#39;s name</span>
      <span class="ruby-comment"># as the autorequire.</span>
      <span class="ruby-constant">Array</span>(<span class="ruby-identifier">dep</span>.<span class="ruby-identifier">autorequire</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">name</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
        <span class="ruby-comment"># Allow `require: true` as an alias for `require: &lt;name&gt;`</span>
        <span class="ruby-identifier">file</span> = <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">name</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">file</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">true</span>
        <span class="ruby-identifier">required_file</span> = <span class="ruby-identifier">file</span>
        <span class="ruby-keyword">begin</span>
          <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">require</span> <span class="ruby-identifier">file</span>
        <span class="ruby-keyword">rescue</span> <span class="ruby-constant">RuntimeError</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">e</span>
          <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">LoadError</span>) <span class="ruby-comment"># we handle this a little later</span>
          <span class="ruby-identifier">raise</span> <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">GemRequireError</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">e</span>,
            <span class="ruby-node">&quot;There was an error while trying to load the gem &#39;#{file}&#39;.&quot;</span>
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">rescue</span> <span class="ruby-constant">LoadError</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">e</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">autorequire</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">path</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">required_file</span>

      <span class="ruby-keyword">if</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">autorequire</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">&quot;-&quot;</span>)
        <span class="ruby-keyword">begin</span>
          <span class="ruby-identifier">namespaced_file</span> = <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-string">&quot;-&quot;</span>, <span class="ruby-string">&quot;/&quot;</span>)
          <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">require</span> <span class="ruby-identifier">namespaced_file</span>
        <span class="ruby-keyword">rescue</span> <span class="ruby-constant">LoadError</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">e</span>
          <span class="ruby-identifier">raise</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">path</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">namespaced_file</span>
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-setup" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">setup</span><span
                                class="method-args">(*groups)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="setup-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 12</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">setup</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">groups</span>)
  <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">ensure_equivalent_gemfile_and_lockfile</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">frozen_bundle?</span>

  <span class="ruby-comment"># Has to happen first</span>
  <span class="ruby-identifier">clean_load_path</span>

  <span class="ruby-identifier">specs</span> = <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">specs_for</span>(<span class="ruby-identifier">groups</span>)

  <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">set_bundle_environment</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">replace_entrypoints</span>(<span class="ruby-identifier">specs</span>)

  <span class="ruby-comment"># Activate the specs</span>
  <span class="ruby-identifier">load_paths</span> = <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">check_for_activated_spec!</span>(<span class="ruby-identifier">spec</span>)

    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">mark_loaded</span>(<span class="ruby-identifier">spec</span>)
    <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">load_paths</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span> <span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">path</span>) }
  <span class="ruby-keyword">end</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">flatten</span>

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">add_to_load_path</span>(<span class="ruby-identifier">load_paths</span>)

  <span class="ruby-identifier">setup_manpath</span>

  <span class="ruby-identifier">lock</span>(<span class="ruby-value">:preserve_unknown_sections</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">true</span>)

  <span class="ruby-keyword">self</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-check_for_activated_spec-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">check_for_activated_spec!</span><span
                                class="method-args">(spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="check_for_activated_spec-21-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 289</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">check_for_activated_spec!</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">activated_spec</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">loaded_specs</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">activated_spec</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>

  <span class="ruby-identifier">suggestion</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">activated_spec</span>.<span class="ruby-identifier">default_gem?</span>
    <span class="ruby-node">&quot;Since #{spec.name} is a default gem, you can either remove your dependency on it&quot;</span> \
    <span class="ruby-node">&quot; or try updating to a newer version of bundler that supports #{spec.name} as a default gem.&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-string">&quot;Prepending `bundle exec` to your command may solve this.&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">e</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">LoadError</span>.<span class="ruby-identifier">new</span> <span class="ruby-node">&quot;You have already activated #{activated_spec.name} #{activated_spec.version}, &quot;</span> \
                         <span class="ruby-node">&quot;but your Gemfile requires #{spec.name} #{spec.version}. #{suggestion}&quot;</span>
  <span class="ruby-identifier">e</span>.<span class="ruby-identifier">name</span> = <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span>
  <span class="ruby-identifier">e</span>.<span class="ruby-identifier">requirement</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Requirement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">to_s</span>)
  <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-prune_gem_cache" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">prune_gem_cache</span><span
                                class="method-args">(resolve, cache_path)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="prune_gem_cache-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 214</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">prune_gem_cache</span>(<span class="ruby-identifier">resolve</span>, <span class="ruby-identifier">cache_path</span>)
  <span class="ruby-identifier">cached</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{cache_path}/*.gem&quot;</span>]

  <span class="ruby-identifier">cached</span> = <span class="ruby-identifier">cached</span>.<span class="ruby-identifier">delete_if</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">spec</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">spec_from_gem</span> <span class="ruby-identifier">path</span>

    <span class="ruby-identifier">resolve</span>.<span class="ruby-identifier">any?</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">s</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">cached</span>.<span class="ruby-identifier">any?</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Removing outdated .gem files from #{Bundler.settings.app_cache_path}&quot;</span>

    <span class="ruby-identifier">cached</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
      <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;  * #{File.basename(path)}&quot;</span>
      <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">path</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-prune_git_and_path_cache" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">prune_git_and_path_cache</span><span
                                class="method-args">(resolve, cache_path)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="prune_git_and_path_cache-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 235</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">prune_git_and_path_cache</span>(<span class="ruby-identifier">resolve</span>, <span class="ruby-identifier">cache_path</span>)
  <span class="ruby-identifier">cached</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{cache_path}/*/.bundlecache&quot;</span>]

  <span class="ruby-identifier">cached</span> = <span class="ruby-identifier">cached</span>.<span class="ruby-identifier">delete_if</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">name</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">path</span>))

    <span class="ruby-identifier">resolve</span>.<span class="ruby-identifier">any?</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">source</span> = <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span>
      <span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:app_cache_dirname</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">source</span>.<span class="ruby-identifier">app_cache_dirname</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">cached</span>.<span class="ruby-identifier">any?</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Removing outdated git and path gems from #{Bundler.settings.app_cache_path}&quot;</span>

    <span class="ruby-identifier">cached</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">path</span>)
      <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;  * #{File.basename(path)}&quot;</span>
      <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">path</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-remove_dir" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">remove_dir</span><span
                                class="method-args">(dir, dry_run)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="remove_dir-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 271</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">remove_dir</span>(<span class="ruby-identifier">dir</span>, <span class="ruby-identifier">dry_run</span>)
  <span class="ruby-identifier">full_name</span> = <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dir</span>).<span class="ruby-identifier">basename</span>.<span class="ruby-identifier">to_s</span>

  <span class="ruby-identifier">parts</span>    = <span class="ruby-identifier">full_name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;-&quot;</span>)
  <span class="ruby-identifier">name</span>     = <span class="ruby-identifier">parts</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>].<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;-&quot;</span>)
  <span class="ruby-identifier">version</span>  = <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">last</span>
  <span class="ruby-identifier">output</span>   = <span class="ruby-node">&quot;#{name} (#{version})&quot;</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">dry_run</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Would have removed #{output}&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Removing #{output}&quot;</span>
    <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">dir</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">output</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-setup_manpath" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">setup_manpath</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="setup_manpath-source">
            <pre><span class="ruby-comment"># File bundler/runtime.rb, line 258</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">setup_manpath</span>
  <span class="ruby-comment"># Add man/ subdirectories from activated bundles to MANPATH for man(1)</span>
  <span class="ruby-identifier">manuals</span> = <span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">man_subdir</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp">/lib$/</span>, <span class="ruby-string">&quot;man&quot;</span>)
    <span class="ruby-identifier">man_subdir</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Dir</span>[<span class="ruby-identifier">man_subdir</span> <span class="ruby-operator">+</span> <span class="ruby-string">&quot;/man?/&quot;</span>].<span class="ruby-identifier">empty?</span>
  <span class="ruby-keyword">end</span>.<span class="ruby-identifier">compact</span>

  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">manuals</span>.<span class="ruby-identifier">empty?</span>
  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">set_env</span> <span class="ruby-string">&quot;MANPATH&quot;</span>, <span class="ruby-identifier">manuals</span>.<span class="ruby-identifier">concat</span>(
    <span class="ruby-constant">ENV</span>[<span class="ruby-string">&quot;MANPATH&quot;</span>] <span class="ruby-operator">?</span> <span class="ruby-constant">ENV</span>[<span class="ruby-string">&quot;MANPATH&quot;</span>].<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">split</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>) <span class="ruby-operator">:</span> [<span class="ruby-string">&quot;&quot;</span>]
  ).<span class="ruby-identifier">uniq</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is a service of <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>, purveyors of fine <a href='https://jamesbritt.bandcamp.com/'>dance noise</a></p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

